<template>
  <div class="row g-5 g-xl-10">
    <div class="col-12">
      <RepoTableWidget @row-selected="handleRowSelected" />
    </div>
    <div class="col-12">
      <RepoMonthlyChart v-if="selectedRepo" :selected-repo="selectedRepo" />
    </div>
  </div>
</template>

<script setup>
import { ref } from 'vue';
import RepoTableWidget from '@/components/biz/RepoTableWidget.vue';
import RepoMonthlyChart from '@/components/analysis/RepoMonthlyChart.vue';

const selectedRepo = ref(null);

const handleRowSelected = (row) => {
  selectedRepo.value = row;
};
</script>
